package com.donica.wamstest.entity;

import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;

public class DeviceInfoVO {
	private String id;
	private String group_index;
	private String object;
	private String dgroup;
	private String item;
	private String cnname;
	private String value;
	private String unit;
	private String desc;
	private String creator;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
	private Timestamp create_time;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
	private Timestamp update_time;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getGroup_index() {
		return group_index;
	}
	public void setGroup_index(String group_index) {
		this.group_index = group_index;
	}
	public String getObject() {
		return object;
	}
	public void setObject(String object) {
		this.object = object;
	}
	public String getDgroup() {
		return dgroup;
	}
	public void setDgroup(String dgroup) {
		this.dgroup = dgroup;
	}
	public String getItem() {
		return item;
	}
	public void setItem(String item) {
		this.item = item;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	public String getCnname() {
		return cnname;
	}
	public void setCnname(String cnname) {
		this.cnname = cnname;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
	}
	public Timestamp getCreate_time() {
		return create_time;
	}
	public void setCreate_time(Timestamp create_time) {
		this.create_time = create_time;
	}
	public Timestamp getUpdate_time() {
		return update_time;
	}
	public void setUpdate_time(Timestamp update_time) {
		this.update_time = update_time;
	}
	
	public void initNullItem() {
		
		if(dgroup == null) {
			dgroup = "";
		}
		
		if(desc == null) {
			desc = "";
		}
		if(creator == null) {
			creator = "";
		}
	}
	public void calGroupIndex() {
		group_index = object+":" + dgroup + ":" + item;
	}
}
